//#pragma once
#include"graphics.h"


//**************************************画出棋盘

extern WINDOW* g_win;
extern GRAPHICS_COLOR g_fore_color;
extern GRAPHICS_COLOR g_back_color;
extern int g_style;
//	┏━┳┓  ┻ ┣ ┫ ╋ ━ ┃
//      ┃  ╋  ┫
//	┗  ┻  ┛
void drawChessboard()
{
	char* str[31];		//15*15的棋盘
     //  str[0]= " ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━  ━ ";
        str[0]= "┏                                                           ┓ ";
        str[1]= "  ┏ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┳ ━ ┓   ";
	 str[2]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	 str[3]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	 str[4]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	 str[5]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   "; 
	 str[6]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	 str[7]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	 str[8]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	 str[9]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
       str[10]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
       str[11]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
       str[12]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	str[13]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	str[14]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	str[15]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	str[16]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	str[17]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	str[18]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	str[19]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	str[20]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
       str[21]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
	str[22]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
       str[23]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
       str[24]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
       str[25] ="  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
       str[26]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
       str[27]= "  ┃ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ╋ ━ ┃   ";
       str[28]= "  ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ┃   ";
	str[29]= "  ┗ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┻ ━ ┛   ";
       str[30]= "┗                                                           ┛ ";                                                          
//━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━      
//clear_screen(0,0,COLS,LINES);		//清屏
	g_fore_color = GCBlack;			//初始化前景色
	g_back_color = GCCyan;			//初始化背景色
	

	wattrset(g_win,CURRENT_ATTRIBUTE);		//更新前景色和背景色
	
       int i;
      //char* p = "************按SPACE下棋**按ESC暂时退出**按 q 悔棋**r--exit*******************";
      // mvaddstr(2,0,p);
	for(i=0; i<31; i++)
	{
		mvaddstr(i+6,8,str[i]);
		
	}
        // int i=0;
       
      // mvaddstr(2,0,p);
	
	g_back_color = GCBlack;			//初始化背景色
	g_fore_color = GCRed;			//初始化前景色
	wattrset(g_win,CURRENT_ATTRIBUTE);		//更新前景色和背景色
	
	
	
}

void dsphelp()
{

       g_fore_color = GCRed;			//初始化前景色
	g_back_color = GCBlack;			//初始化背景色
	wattrset(g_win,CURRENT_ATTRIBUTE);		//更新前景色和背景色
        int i=0;
       char* p[] = {"1.按SPACE下    棋","2.按r    求    助","3.按q    悔    棋","4.按ESC  暂时退出","5.按t    对    话"};
      // mvaddstr(2,0,p);
       clear_screen(10,75,COLS,LINES);		//COLS，LINES是库函数中的宏
	for(i=0; i<5; i++)
	{
		mvaddstr(9+i,75,p[i]);
		
	}
      // wrefresh(g_win);
      // g_fore_color = GCYellow;			//设置前景色
	//g_back_color = GCBlue;			//设置背景色
	//wattrset(g_win,CURRENT_ATTRIBUTE);		//更新前景色和背景色
	
       //g_back_color = GCBlack;			//初始化背景色
	//g_fore_color = GCRed;			//初始化前景色
	//wattrset(g_win,CURRENT_ATTRIBUTE);		//更新前景色和背景色

}
